home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-serious-
/
wb
/
cutnpaste
/
install_cutnpaste
next >
Wrap
Text File
|
1999-09-06
|
12KB
|
285 lines
; Opus Cut'n'Paste V3.4 Installation Utility
; © 1999 Keith Halstead (28.08.99)
(procedure getdopusver
( (set #dopusverrev (getversion "DOpus5:DirectoryOpus"))
(set #dopusver (/ #dopusverrev 65536))
(set #dopusrev (- #dopusverrev (* #dopusver 65536)))
(set #textdopusrev (cat #dopusrev))
(set #versioncheck "passed")
)
)
(complete 0)
; checks for presence of at least DOpus 5.5
(if (= (getassign "DOpus5") "")
(abort "You do not appear to be running Directory Opus 5!\n\nThe DOpus5: assign is not present!")
)
(if (exists "DOpus5:DirectoryOpus")
( (getdopusver)
(if (AND (< (substr #textdopusrev 0 1) 5) (> #dopusver 0))
(abort ("You only have Directory Opus V%ld.%ld!\n\nOpus Cut'n'Paste requires at least DOpus V5.5!" #dopusver #dopusrev))
)
(if (= #dopusver 0)
(set #versioncheck "failed")
)
)
)
(message (cat "\nWelcome to the Opus Cut'n'Paste V3.4 installation utility!\n\n"
"Cut'n'Paste adds the ability to cut, copy and paste files and directories "
"to and from a clipboard in Directory Opus. However there are many more "
"features available such as pasting into archives, pasting links, renaming "
"as you paste and so on.\n\n"
"Please read the accompanying documentation for "
"further instructions about the program."))
(message (cat "\n\nYou appear to have at least DOpus 5.5 running.\n\nPlease also ensure that "
"RexxMast is running and \"Name Mode PopUp\" is turned on in DOpus's \"Lister "
"Options\".\n\nThen click \"Proceed\"..."))
(complete 5)
; set up available language names
(set #language_0 "English (built-in)")
(set #language_1 "Català")
(set #language_2 "Dansk")
(set #language_3 "Deutsch")
(set #language_4 "Español")
(set #language_5 "Français")
(set #language_6 "Italiano")
(set #language_7 "Norsk")
(set #language_8 "Polski")
(set #language_9 "Suomi")
(set #language_10 "Svenska")
; Check if any one of the available languages match the WB3.1 LOCALE settings
(set #defaultlanguageno 0)
(if (exists "ENV:Language")
( (set #i 0)
(while (< #i 11)
( (set #currentlanguage (select #i #language_0 #language_1 #language_2 #language_3 #language_4
#language_5 #language_6 #language_7 #language_8 #language_9
#language_10)
)
(if (patmatch (getenv "language") #currentlanguage)
(set #defaultlanguageno #i)
)
(set #i (+ #i 1))
)
)
)
)
; Choose language for Cut'n'Paste and highlight the current LOCALE setting (3.1 only)
(set #cnplanguageno
(askchoice
(prompt (cat "Please select one of these languages for Cut'n'Paste (you must have "
"the appropriate LOCALE: settings). Please note that older catalogs "
"are incompatible with V3.4.\n"
"* = incomplete - some words are currently in English."))
(help @askchoice-help)
(choices #language_0 (cat #language_1 " *") #language_2 #language_3 #language_4 #language_5
#language_6 #language_7 (cat #language_8 " *") #language_9 #language_10)
(default #defaultlanguageno)
)
)
; Set the name of the language to be installed
(set #cnplanguagename (select #cnplanguageno #language_0 #language_1 #language_2 #language_3
#language_4 #language_5 #language_6 #language_7 #language_8
#language_9 #language_10))
(complete 10)
; Copy the catalog file to LOCALE:Catalogs/#cnplanguagename
(if (> #cnplanguageno 0)
(if (exists (tackon "LOCALE:Catalogs/" #cnplanguagename))
(copyfiles
(prompt ("Copying the %s catalog file for Cut'n'Paste..." #cnplanguagename))
(help @copyfiles-help)
(source (cat "locale/" #cnplanguagename "/CutNPaste.catalog"))
(dest (cat "LOCALE:Catalogs/" #cnplanguagename))
(confirm)
)
(copyfiles
(prompt (cat ("The catalog directory for %s didn't exist!" #cnplanguagename)
" Press 'Proceed' to automatically make it or you may copy it"
" to an alternative location or skip this part.\n\n"
("Copying the %s catalog file for Cut'n'Paste..." #cnplanguagename)))
(help @copyfiles-help)
(source (cat "locale/" #cnplanguagename "/CutNPaste.catalog"))
(dest (cat "LOCALE:Catalogs/" #cnplanguagename))
(confirm average)
)
)
)
(complete 25)
; Copy main script - do this after the catalog so the script will activate with the correct language
(copyfiles
(prompt "Copying Cut'n'Paste ARexx script...\nYou really shouldn't skip this part...")
(help (cat "You should not skip this part to ensure you have the latest version installed."
"\n\nPlease also ensure that you have no other, renamed Cut'n'Paste scripts "
"in DOpus5:Modules!\n\n" @copyfiles-help))
(source "Opus5/Modules/")
(pattern "CutNPaste.dopus5")
(dest "DOpus5:Modules")
(confirm)
)
(complete 40)
; asks user if he wants to install the custom toolbar icons
(set #installimages
(askbool
(prompt (cat "Would you like to install some custom toolbar icons for Cut'n'Paste?\n\n"
"If you are using an earlier version of DOpus than 5.66 then you will need "
"to set up toolbars to operate Cut'n'Paste so you should select \"Yes\". "
"Users of later versions of DOpus can use Cut'n'Paste fully from the "
"pop-up menus but you may find it useful to set up the lister toolbar too.\n\n"
"(You will need to set up the toolbars yourself - step-by-step instructions "
"are provided in the documentation.)"))
(help @askbool-help)
)
)
(complete 50)
; gets the destination directory for the toolbar icons and copies them
(if (= #installimages 1)
( (set #destimagesdrawer
(askdir
(prompt (cat "Please select the drawer to install the toolbar icons in. "
"A drawer called \"CutNPaste\" will be created for them"))
(default "DOpus5:Images")
(help (cat "Note that the images will be placed in a new directory called "
"\"CutNPaste\" so that you can easily delete them if you don't like "
"them. So if you accept the default destination the toolbar icons "
"will be placed in \"DOpus5:Images/CutNPaste/\".\n\n" @askdir-help))
)
)
(copyfiles
(prompt "Copying Cut'n'Paste custom toolbar icons...")
(help @copyfiles-help)
(source "Opus5/Images/")
(dest (tackon #destimagesdrawer "CutNPaste"))
(pattern "#?")
(confirm)
)
)
)
(complete 60)
; asks expert user if he would like to install Cut'n'Paste doc; average user must install it
(if (= @user-level 2)
(set #installhelp
(askbool
(prompt (cat "Would you like to install the Cut'n'Paste AmigaGuide® documentation?\n\n"
"This is strongly recommended so that you don't miss out on all "
"of the features of Cut'n'Paste, such as the configuration options.\n\n"
"If you install the documentation in \"DOpus5:Help/\" it will be available "
"through the \"Help...\" button on Cut'n'Paste's \"About\" window."))
(help @askbool-help)
)
)
(set #installhelp 1)
)
(complete 70)
(if (= #installhelp 1)
( (set #desthelpdrawer
(askdir
(prompt (cat "Please select the drawer to install Cut'n'Paste's AmigaGuide® "
"documentation in. You are strongly recommended to put it in "
"\"DOpus5:Help/\" so that it is available through Cut'n'Paste's "
"\"About\" window."))
(default "DOpus5:Help")
(help (cat "If DOpus5:Help doesn't exist, create it now!\n\n" @askdir-help))
)
)
(copyfiles
(prompt "Copying Cut'n'Paste AmigaGuide® documentation and icon...")
(help @copyfiles-help)
(source "Opus5/Help/")
(dest #desthelpdrawer)
(pattern "#?")
(confirm)
)
)
)
(complete 80)
(copyfiles
(prompt (cat "Would you like to copy the Cut'n'Paste translation document so you could "
"easily produce your own foreign translation?"))
(help @copyfiles-help)
(source "locale")
(dest "LOCALE:")
(pattern "CutNPaste.cd")
(confirm average)
)
(complete 90)
(if (= #versioncheck "passed")
(if (OR (= (substr #textdopusrev 0 2) "66") (>= (substr #textdopusrev 0 1) "8"))
(message (cat ("You have Directory Opus V%ld.%ld.\n\n"#dopusver #dopusrev)
"You can use Cut'n'Paste straight away without needing to set up "
"lister toolbars.\n\nClick proceed..."))
(if (= (substr #textdopusrev 0 1) "6")
(message (cat ("You have Directory Opus V%ld.%ld.\n\n" #dopusver #dopusrev)
"This is an obsolete version of Magellan I! Upgrade for FREE at\n"
"http://www.gpsoft.com.au\n"
"to V5.66, or even better, buy the upgrade to Magellan II!\n\n"
"Users of Magellan V5.66+ or Magellan II can use Cut'n'Paste "
"immediately. With your current version, you will need to set up toolbar "
"icons to access most of Cut'n'Paste's commands, as for DOpus V5.5."
"\n\nClick proceed..."))
(message (cat ("You have Directory Opus V%ld.%ld.\n\n" #dopusver #dopusrev)
"You will need to set up lister toolbars to access most of "
"Cut'n'Paste's commands - see the documentation for step-by-step "
"instructions.\n\n"
"(Users of DOpus Magellan 5.66+ and Magellan II do not need to "
"to do this!)\n\nClick proceed..."))
)
)
(message (cat "We can't check the version of DOpus you are running. This may because:\n\n"
"1. The executable is not at \"DOpus5:DirectoryOpus\" or;\n"
"2. You have packed the executable.\n\n"
"If you have at least Magellan 5.66 you can use Cut'n'Paste immediately. "
"If you have an earlier version then you will need to set up lister toolbars, "
"as described in the documentation.\n\nClick proceed..."))
)
(complete 95)
(message (cat "As a test that Cut'n'Paste is now installed and ready to use, click \"Proceed\" "
"to display Cut'n'Paste's \"About\" window in the language you chose earlier - "
#cnplanguagename ".\n\n"
"From that window, select \"Help...\" to display Cut'n'Paste's documentation "
"(if you put it in \"DOpus5:Help/\"). Otherwise select \"OK\".\n\n"
"If it doesn't appear, ensure RexxMast is running! Otherwise, follow the "
"manual installation."))
(run ("rx \"address dopus.1 command 'clip-about'\" "))
(run ("wait 1 sec"))
(set @default-dest "")
(complete 100)
(exit (cat "The installation of Opus Cut'n'Paste V3.4 is now complete.\n\n"
"I hope you find it very useful as I've put a lot of time and effort into it! "
"Please e-mail\ncutnpaste@halsteadk.freeserve.co.uk\n"
"with your comments and suggestions!\n\nKeith Halstead\n28th August 1999\n\n\n"
"If you haven't already done so, please read the documentation!! "
"(Right-click on a lister border, select \"About...\", then \"Help...\".)" (quiet)))